/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.factory.web.json;

import com.factory.web.service.problems.ProblemEnum;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author milos
 */
@XmlRootElement
public class Problem {

    private List<String> parameters;
    private ProblemEnum algorithmicProblem;
    private transient String value;
    private String userId;

    private List<String> linesList;

    public Problem() {
    }

    public Problem(ProblemEnum algorithmicProblem) {
        if (parameters == null) {
            parameters = new ArrayList<String>();
        }
        this.algorithmicProblem = algorithmicProblem;
    }

    public ProblemEnum getAlgorithmicProblem() {
        return algorithmicProblem;
    }

    public void setAlgorithmicProblem(ProblemEnum algorithmicProblem) {
        this.algorithmicProblem = algorithmicProblem;
    }

    public List<String> getParameters() {
        return parameters;
    }

    public void setParameters(List<String> parameters) {
        this.parameters = parameters;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
        parameters.add(value);
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public List<String> getLinesList() {
        return linesList;
    }

    public void setLinesList(List<String> linesList) {
        this.linesList = linesList;
    }
    
       public void addLine(String line) {
        if (linesList == null) {
            linesList = new ArrayList<String>();
        }
        linesList.add(line);
    }

}
